from database import MySQLDatabase

if __name__ == '__main__':

    db = MySQLDatabase('localhost', 'root', 'chendg', 'test')
    db.open()

    # 执行一个简单的查询
    # db.execute_query("INSERT INTO your_table (column1, column2) VALUES (%s, %s)", ('value1', 'value2'))

    # 获取数据
    results = db.fetch_all("SELECT * FROM users")
    for row in results:
        print(row)

    db.close()
